package cn.theten52.demo.patterns.design.behavior.state;

/**
 * 商品售罄状态类
 *
 * @author wangjin
 * @date 2020/12/30
 */
public class EmptyState implements State {

    VendingMachine machine;

    public EmptyState(VendingMachine machine) {
        this.machine = machine;
    }

    @Override
    public void choose() {
        System.out.println("对不起商品已售罄！");
    }

    @Override
    public boolean payment() {
        System.out.println("对不起商品已售罄！");
        return false;
    }

    @Override
    public void dispenseCommodity() {
        System.out.println("对不起商品已售罄！");
    }
}
